:root {
    background-color: #E5E7DF;
    --border-color: #DCDED4;
    --container-color: #F3F4F0;
    --button-border: #CCCCCC;
    --button-border-hover: #AAA;
    --radius: 8px;
    --input-color: #FFF;
    --panel-color: #FFF;
    --label-color: #a0a0a0;
    --button-shadow: #E1DDDD;
    --tip-color: #343434;
    --link-color: rgb(245 78 0);
    --default-font: system-ui, -apple-system, sans-serif; 
    font-family: var(--default-font);

}

body { 
    margin: 0; 
    padding: 1rem; 
    background-color: var(--container-color); 
    color: #333; 
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border-color);
}

a {
    color: var(--link-color);
    font-weight: 600;
    text-decoration: none;
}

.tip {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--tip-color);
    margin-bottom: 1.5rem;
}

.config-section {
    background-color: var(--panel-color);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}



h1, h2 { color: #000000;
}

h1 {
    font-weight: 700;
    font-size: 1.5rem;

}

h2 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.form-group { margin-bottom: 15px; }
label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 600;
}
input[type='text'], input[type='password'] { 
    width: 100%; 
    padding: 8px; 
    border: 1px solid #ddd; 
    border-radius: 8px; 
    box-sizing: border-box; 
    font-size: 1rem;
}
.button-container { 
    margin-top: 15px; 
    text-align: center; 
}
button, select { 
    display: inline-block; 
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    height: 40px;
    text-decoration: none; 
    background-color: var(--input-color);
    border: 1px solid var(--button-border);
    border-radius: var(--radius); 
    cursor: pointer; 
    padding: 0 16px;

    box-shadow: 0 4px 0 0 var(--button-shadow),
                0 5px 0 0 var(--button-border);
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

input, select {
    height: 40px;
}

button:active {
    background-color: #DCDDD9;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 1rem;
}

li:last-child {
    margin-bottom: 0;
}

footer { 
    text-align: center; 
    margin-top: 4rem; 
    color: #777; 
    font-size: 0.8em; 
}
.network-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}
.network-item {
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.network-item:hover {
    background-color: #f5f5f5;
}
.network-item.selected {
    background-color: #e0f0ff;
}

.lock-icon {
    margin-left: 5px;
}
.success-icon {
    color: #28a745;
    font-size: 48px;
    text-align: center;
    margin: 20px 0;
}
.progress {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin: 20px 0;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background-color: #cc7000;
    width: 0%;
    transition: width 10s linear;
}
.hidden {
    display: none;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem top 50%;
    background-size: 1rem auto;
    padding-right: 2rem;
    background-color: var(--input-color);
    font-family: var(--default-font);
}

select::-ms-expand {
    display: none;
}

/* Status message styling (used by global-action-status) */
.status-message {
    padding: 0.75em;
    margin-bottom: 1em;
    border-radius: 4px;
    text-align: center;
    font-family: monospace; /* Added for fixed-width font */
}

#firmware-update-section {
    font-family: monospace;
}

.status-message.info {
    background-color: #e7f3fe; /* Light blue for info */
    border: 1px solid #d0eaff;
    color: #31708f;
}

.status-message.success {
    background-color: #d4edda; /* Light green for success */
    border: 1px solid #c3e6cb;
    color: #155724;
}

.status-message.error {
    background-color: #f8d7da; /* Light red for error */
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Release notes box specific styling */
#release-notes {
    /* Assuming .release-notes-box class already exists or you style #release-notes directly */
    /* If .release-notes-box is the primary selector for layout, add font-family there */
    /* For direct styling of the <pre> tag by ID: */
    font-family: monospace; /* Added for fixed-width font */
    white-space: pre-wrap;  /* Ensures long lines wrap */
    word-wrap: break-word;  /* Breaks long words if necessary */
    background-color: #f8f9fa; /* Light background for the box */
    border: 1px solid #dee2e6;   /* Border for the box */
    padding: 10px;              /* Padding inside the box */
    max-height: 200px;          /* Max height with scroll if content exceeds */
    overflow-y: auto;           /* Enable vertical scroll */
    border-radius: var(--radius); /* Consistent border radius */
}

/* Available cards list styling */
.available-card-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: var(--input-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.available-card-info {
    flex: 1;
}

.available-card-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.available-card-description {
    font-size: 0.9rem;
    color: var(--label-color);
    margin-bottom: 0.25rem;
}

.available-card-status {
    font-size: 0.8rem;
    color: var(--label-color);
    font-style: italic;
}

.available-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 120px;
}

.add-card-btn {
    background-color: var(--input-color);
    border: 1px solid var(--button-border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 4px 0 0 var(--button-shadow),
                0 5px 0 0 var(--button-border);
}

.add-card-btn:hover {
    background-color: #DCDDD9;
}

.add-card-btn:active {
    background-color: #DCDDD9;
}

.delete-card-btn {
    background-color: var(--input-color);
    color: #dc3545;
    border: 1px solid var(--button-border);
    padding: 5px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 0 0 var(--button-shadow),
                0 3px 0 0 var(--button-border);
}

.delete-card-btn:hover {
    background-color: #DCDDD9;
}

.delete-card-btn:active {
    background-color: #DCDDD9;
}

.config-input {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

/* Drag and drop styling for configured cards */
.card-item {
    border: 1px solid var(--border-color);
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    background: #f9f9f9;
    cursor: move;
    transition: all 0.2s ease;
}

.card-item:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.card-item.drag-over {
    border-color: #007bff;
    background: #e3f2fd;
    border-style: dashed;
    border-width: 2px;
}

.drag-handle {
    color: var(--label-color);
    cursor: grab;
    font-size: 1.2rem;
    margin-right: 0.5rem;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}